package io.github.loserya.core.sdk.aggregate.base;

import java.io.Serializable;


public interface MogoAggregate<lambda, Q, R> extends Serializable {

    default lambda filed(Q column, R resColum) {
        return filed(true, column, resColum);
    }

    default lambda avg(Q column, R resColum) {
        return avg(true, column, resColum);
    }

    default lambda count(Q column, R resColum) {
        return count(true, column, resColum);
    }

    default lambda max(Q column, R resColum) {
        return max(true, column, resColum);
    }

    default lambda min(Q column, R resColum) {
        return min(true, column, resColum);
    }

    default lambda sum(Q column, R resColum) {
        return sum(true, column, resColum);
    }

    lambda filed(boolean condition, Q column, R resColum);

    lambda avg(boolean condition, Q column, R resColum);

    lambda count(boolean condition, Q column, R resColum);

    lambda max(boolean condition, Q column, R resColum);

    lambda min(boolean condition, Q column, R resColum);

    lambda sum(boolean condition, Q column, R resColum);

}
